#ifndef _INCL_AP_ICP
#define _INCL_AP_ICP

#include "AP_def.h"

class AP_ICP
{
 public:
      AP_ICP();
      
      
  TypeScan scan_prev; 
  
  vector<GPoint2D> cart_scan;
  vector<GPoint2D> cart_scan_match;
  vector<GPoint2D> cart_scan_prev;
  
  vector<int> matched_id_c;
  vector<int> matched_id_p;
  
  float dx;
  float dy;
  float dx_tot;
  float dy_tot;
  
  float dtheta;
  float dtheta_tot;
  
  int opt_match_extent;
  float opt_match_threshold;
  
  float dtms;
  
  bool first_exec;

  void scan_polarTocartesian(TypeScan& scan,vector<GPoint2D>& cart_scan_);
  void analyse(TypeScan& scan);

};

#endif